<?php
namespace Admin\Controller;
use Admin\Controller;
class IndexController extends CommonController {
    public function indexAction(){
        $index=D('Index');
        $res=$index->index();
        $this->assign('list',$res);
    	$this->display();
    }
 
	
    //添加管理员
    public function addadminAction(){
        $admin=M('admin');
        $data['name']='admin';
        $data['password']=md5('admin');
        $data['ctime']=time();
        $data['utime']=time();
        $res=$admin->data($data)->add();
        if ($res) {
            echo 'good';
        }else{
            echo "sb";
        }

    }
   

}